home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / edit / mg2a_src.zip / SYS / AMIGA / MAKEFILE.LAT < prev    next >
Text File  |  1988-08-23  |  10KB  |  283 lines

  1. #
  2. # Makefile for Amiga MG 2x, using Lattice small model.
  3. #
  4. # This Makefile uses the PD Make to be found on fish disk #69, expecting to
  5. # run lc and blink from Lattice version 4. The directory that holds this
  6. # makefile and the system-independent files should be named "mg", unless
  7. # TOP is changed to match.
  8. #
  9. #    This Makefile should be executed in the main Emacs directory.
  10. #
  11. # System-dependent conditional compilation possibilities:
  12. #
  13. #    V11        -- must be defined for the editor to either run on
  14. #               or compile on a version 1.1 AmigaDOS system.
  15. #               It mainly wards against bugs in the 1.1 ROM
  16. #               Kernel.
  17. #
  18. #    NO_STARTUP    -- if defined, code for using a startup file
  19. #               is not included.
  20. #
  21. #    MENU        -- if defined, Intuition menu selection is
  22. #               enabled.  If you #define this, the XOBJ macro
  23. #               must contain $(MENUOBJ).
  24. #
  25. #    BROWSER        -- BROWSER uses the Amiga menu to present a MENU of
  26. #               files. Selecting a directory entry (ends with a /)
  27. #               makes the contents if that directory the next menu
  28. #               (deleting any menus that used to follow it);
  29. #               selecting a plain file does a "find-file" on that
  30. #               file name. Really has to be seen to be understood.
  31. #               XOBJ must contain $(MENUOBJ) for this to link.
  32. #
  33. #    MOUSE        -- if defined, the Amiga mouse is active.
  34. #               If you #define this, XOBJ must contain $(MOUSEOBJ)
  35. #
  36. #    FKEYS        -- if defined, the editor understands the Amiga
  37. #               function keys.
  38. #
  39. #    NO_BACKUP    -- Disable the creation of backup files. If this
  40. #               option is defined, the function make-backup-files
  41. #               sets a flag that causes save-buffers (C-x C-s)
  42. #               to rename the original file to file~ before
  43. #               writing the file.  Nice if the space is available.
  44. #               By default, backup files are not made.  Calling
  45. #               make-backup-files with no argument enables this
  46. #               feature; calling it with an argument disables it.
  47. #
  48. #    DO_METAKEY    -- if defined, characters with high bit set (i.e.
  49. #               most ALT-ed characters in the usa0 keymap)
  50. #               are translated into internal META keys
  51. #
  52. #    DO_ICONIFY    -- if defined, provide a function to iconify the Emacs
  53. #               window into a gadget that can be double-clicked to
  54. #               return to the normal display.
  55. #
  56. #    CHANGE_COLOR    -- if defined, adds commands to manipulate
  57. #               the rendition of the mode line and the
  58. #               foreground and background color of the
  59. #               text window and mode line.  The names match
  60. #               the regular expression
  61. #               set-{text,mode}-{foreground,background}
  62. #    CHANGE_FONT    -- if defined, adds "set-font", which prompts
  63. #               for a font name and size, then tries to reopen
  64. #               the Emacs window using the new font.
  65. #    USE_ARP        -- Use the ARP (AmigaDOS Replacement Library) for
  66. #               some functions.  This makes the executable
  67. #               slightly smaller, but gives no new functionality
  68. #               in the current version.  It will probably be
  69. #               required for some future version.
  70. #        USE_ARP has not be tested with the LATTICE version
  71. #
  72. #
  73. #    MODE_RENDITION    -- the these values indicate the way to render
  74. #    TEXT_RENDITION       characters in the text area and mode line.
  75. #               TEXT_RENDITION is mainly there for completeness.
  76. #               Possible values are:
  77. #                0 -- plain text
  78. #                1 -- boldface
  79. #                3 -- italic
  80. #                4 -- underscore
  81. #                7 -- reverse-video (default if not defined)
  82. #
  83. #    TEXT_FG        -- specifies which system color (0-7) to use
  84. #    TEXT_BG           when drawing the text and mode line.  If they
  85. #    MODE_FG           aren't between 0 and 7, or if a combination
  86. #    MODE_BG           comes out badly, it's *YOUR* fault.  If
  87. #               CHANGE_COLOR is defined, you get to change these
  88. #               values on the fly.  Naturally, making both
  89. #               FG and BG the same results in an unusable display...
  90. #
  91. ############################################################################
  92. S    = sys/amiga
  93. TOP    = mg
  94. LIBS    = lib:lc.lib lib:amiga.lib
  95.  
  96. #
  97. # PREFS contains the defines used to select compile-time options.
  98. # XOBJ is used to denote any extra object files needed for these
  99. # options.  MENUOBJ and MOUSEOBJ denote the extra object files
  100. # needed for the menu, mouse and Browser. ARPOBJ is the extra
  101. # object file needed to use arp.library. REGEX is the binaries for the regular
  102. # expression code (requires -dREGEX). REGEX has not been tested under
  103. # Lattice 4.0
  104.  
  105. MOUSEOBJ = ttymouse.o
  106. MENUOBJ  = ttymenu.o menustack.o
  107. ICONIFYOBJ = iconify.o ttyicon.o
  108.  
  109. #
  110. # the following turn into files with no source in them if you compile with
  111. # the appropriate option turned off. Lattice incorrectly flags this as an error
  112. # instead of a warning. To get around this, you have to add the appropriate
  113. # #?OBJ macro to the XOBJ line for your configuration if you want it.
  114. # Ugly, but it works. There are probably other such things that I've missed.
  115. # The fix is to add a name here, put that on your xobj line, and delete it from
  116. # whichever of OBJ OOBJ or IND that the #?.o files lives in now.
  117. #
  118.  
  119. MACROOBJ = macro.o
  120. REGEXOBJ = regex.o re_search.o
  121. DIREDOBJ = dired.o
  122.  
  123. # The big burrito, with the Browser *and* the editing MENU.  Tough
  124. # on space, but boy is it neat...
  125. #PREFS = -dSTARTUP -dDO_METAKEY -dDO_ICONIFY -dCHANGE_FONT -dBACKUP -dFKEYS \
  126. #    -dMOUSE -dMENU -dBROWSER -dCHANGE_COLOR -dBINDKEY -dBSMAP=0
  127. #XOBJ  = $(MOUSEOBJ) $(MENUOBJ) $(ICONIFYOBJ) $(MACROOBJ) $(DIREDOBJ)
  128.  
  129. # Burrito style, with just the Browser...
  130. #PREFS = -dSTARTUP  -dBROWSER -dMOUSE -dCHANGE_COLOR -dFKEYS -dDO_ICONIFY \
  131. #    -dDO_METAKEY -dBACKUP
  132. #XOBJ  = $(MOUSEOBJ) $(MENUOBJ) $(ICONIFYOBJ) $(MACROOBJ) $(DIREDOBJ)
  133.  
  134. # Burrito style, with just the menu... # untested for mg2
  135. #PREFS = -dSTARTUP  -dMENU -dMOUSE -dCHANGE_COLOR -dFKEYS -dDO_ICONIFY \
  136. #    -dDO_METAKEY -dBACKUP -dBSMAP=0
  137. #XOBJ  = $(MOUSEOBJ) $(MENUOBJ) $(ICONIFYOBJ) $(MACROOBJ) $(DIREDOBJ)
  138.  
  139.  
  140. # Mike's favorite version
  141. PREFS = -dMOUSE -dBROWSER -dMODE_RENDITION=0 -dMODE_FG=2 -dDO_METAKEY \
  142.     -dGOSREC -dGOSMACS -dDO_ICONIFY -dNO_STARTUP -dNO_DIRED -dBSMAP=1
  143. XOBJ = $(MOUSEOBJ) $(MENUOBJ) $(ICONIFYOBJ) $(MACROOBJ)
  144.  
  145. # Mic's favorite version # untested for mg2
  146. #PREFS = -dSTARTUP -dBROWSER -dMENU -dMOUSE -dCHANGE_FONT -dFKEYS
  147. #    -dDO_METAKEY -dDO_ICONIFY -dBACKUP -dPREFIXREGION
  148. #XOBJ  = $(MOUSEOBJ) $(MENUOBJ) $(ICONIFYOBJ) $(MACROOBJ) $(DIREDOBJ)
  149.  
  150. # Steve's favorite version # untested for mg2
  151. #PREFS  = -dSTARTUP -dMOUSE -dCHANGE_FONT -dFKEYS -dDO_METAKEY \
  152. #     -dBACKUP -dPREFIXREGION -dUSE_ARP
  153. #XOBJ   = $(MOUSEOBJ) $(MACROOBJ) $(DIREDOBJ)
  154.  
  155. # Absolutely bare-bones, default editor
  156. #PREFS = -dDO_METAKEY
  157. #XOBJ  =
  158.  
  159. CC    = lc
  160. AS    = asm
  161. CFLAGS    = -i$(S)/ -isys/default/ $(PREFS) -dAMIGA -dLATTICE -b -qram:
  162.  
  163. # Objects which only depend on the "standard" includes
  164. OBJS    = basic.o dir.o file.o line.o match.o paragraph.o \
  165.       random.o region.o search.o version.o window.o word.o
  166.  
  167. # Those with unique requirements
  168. IND    = buffer.o display.o echo.o extend.o help.o kbd.o keymap.o \
  169.       main.o modes.o
  170.  
  171. # System dependent objects
  172. OOBJS = cinfo.o spawn.o ttyio.o tty.o ttykbd.o fileio.o sleep.o \
  173.     sysinit.o console.o dirio.o offset.o
  174.  
  175. OBJ = $(OBJS) $(IND) $(OOBJS) $(XOBJ)
  176.  
  177. OSRCS    = cinfo.c fileio.c spawn.c ttyio.c tty.c ttykbd.c fileio.c sleep.c \
  178.       sysinit.c console.c dirio.c amiga_maps.c offset.c
  179. SRCS    = basic.c dir.c dired.c file.c line.c match.c paragraph.c \
  180.       random.c region.c search.c version.c window.c word.c \
  181.       buffer.c display.c echo.c extend.c help.c kbd.c keymap.c \
  182.       macro.c main.c modes.c regex.c re_search.c
  183.  
  184. OINCS =    $(S)/ttydef.h $(S)/sysdef.h sys/default/chrdef.h
  185. INCS =    def.h
  186.  
  187.  
  188. #
  189. # The editor
  190. # Building in Ram: saves a LOT of time in pass 2 of the linker.
  191. #
  192. mg:        $(OBJ)
  193.         blink lib:c.o $(OBJ) lib $(LIBS) to mg map nil: \
  194.         SMALLCODE SMALLDATA NODEBUG
  195.  
  196. # From the Manx version forget it for now.
  197. #
  198. # lint:
  199. #     lint +vm -ilint: -e7?? $(CFLAGS) std.lnt mg
  200. #
  201.  
  202. $(OBJ):        $(INCS) $(OINCS)
  203.  
  204. dir.o search.o:    $(INCS) $(OINCS)
  205.  
  206. regex.o re_search.o:    $(INCS) $(OINCS) regex.h
  207.  
  208. kbd.o:    $(INCS) $(OINCS) macro.h kbd.h key.h
  209.  
  210. macro.o main.o:    $(INCS) $(OINCS) macro.h
  211.  
  212. buffer.o display.o keymap.o help.o modes.o dired.o fileio.o: \
  213.     $(INCS) $(OINCS) kbd.h
  214.  
  215. extend.o:    $(INCS)